server {

listen 80000;

server_name xxx;

root "/home/www/wen/api/public";

location / {

index index.html index.htm index.php;

if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
}
}
error_page 404 403 500 502 503 504 /404.html;
location = /404.html {
root /;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}
}


server {

listen 8083;

server_name 127.0.0.1;

index index.html index.htm index.php;

root /home/www/wen/api/public;



## log begin

set $log_val '';

lua_need_request_body on;

access_by_lua_file /usr/local/openresty/nginx/lua/access.lua;

body_filter_by_lua_file /usr/local/openresty/nginx/lua/body_filter.lua;

log_by_lua_file /usr/local/openresty/nginx/lua/log.lua;

## log end



add_header Access-Control-Allow-Origin *;

add_header Access-Control-Allow-Headers X-Requested-With;

add_header Access-Control-Allow-Methods GET,POST,PUT,DELETE,OPTIONS;



location / {

if (!-e $request_filename) {

rewrite . /index.php last;

break;

}

}

location ~ .*\.(php|php5)?$ {

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME /home/www/wen/api/public$fastcgi_script_name;

include fastcgi_params;

}

}

server {
    listen 8083;
    listen [::]:8083;
    root /home/www/wen/api/public;
    server_name lumen_demo.com;
    error_log /var/log/nginx/lumne_demo_error.log;

    location / {
            try_files $uri $uri/ /index.php?$query_string;
    }
    location ~ \.php$ {
            fastcgi_split_path_info ^(.+.php)(/.+)$;
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_param  SCRIPT_FILENAME  $document_root/index.php;
    }
}
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;


server { 
    listen       80; 
    server_name  laravel.com; 
    set  $DOC_ROOT /home/www/wen/api/public; 
    root $DOC_ROOT; 
    index index.php index.html index.htm;
    try_files $uri $uri/ /index.php?$query_string;
 
    location ~ \.php {
        fastcgi_pass   127.0.0.1:9000; 
        fastcgi_param  SCRIPT_FILENAME  $DOC_ROOT$fastcgi_script_name;  
        include        fastcgi_params;
    }
}